<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .box {
      width: 300px !important;
      height: 300px !important;
      background-color: pink !important;
      transform: rotate(360deg);
    }

    #box {
      width: 200px;
      height: 200px;
      background-color: hotpink;
      transition: all .1s;
    }
  </style>
</head>

<body>
  <div id="box" class="box"></div>
  <script src="../jq/jquery-3.2.1.js"></script>
  <script>
    $(function () {

      $('#box').click(function () {
        // addClass 添加类
        // $(this).addClass('box')

        // removeClass 移除类
        // $('#box').removeClass("box")

        //  切换类
         $('#box').toggleClass('box')

      })

      
    })
  </script>
</body>

</html>